package observerPattern.observerCPattern;


/**
 * @program: course
 * @author: lsn
 * @create: 2024-04-28 10:36
 * @description: 角色：具体观察者
 */
public class WeChatUser implements Observer {
    // 微信用户名
    private String name;
    public Subject subject;

    public WeChatUser(String name) {
        this.name = name;
    }

    public WeChatUser(String name, Subject subject) {
        this.name = name;
        this.subject = subject;
    }

    @Override
    public void update(String message) {
        System.out.println("微信用户："+ name +  "接收到公众号新推送 ——  " + message);
    }

}

